home *** CD-ROM | disk | FTP | other *** search
/ PC-Blue - MS DOS Public Domain Library / PC-Blue MS-DOS Public Domain Library - NYACC.iso / vol369 / graph.arc / GRAPH.DOC next >
Encoding:
Text File  |  1987-08-25  |  9.6 KB  |  240 lines

  1. NAME
  2.     graph - plot a tabulated function
  3.  
  4. SYNOPSIS
  5.     graph [file file file] [options]
  6.  
  7. DESCRIPTION
  8.     Graph takes pairs of points (two numbers per line) from the given
  9.     file (or standard input) as x- and y- values and plots them on the
  10.     screen, connected by straight lines.  A string surrounded by quotes
  11.     "..." may follow a pair of points, and will be displayed starting
  12.     at that point.  The program draws axes with convenient labels
  13.     (integers times powers of 1000), plots the data, waits for a
  14.     keypress, then resets the screen parameters and clears the screen
  15.     before exiting.  If data is taken from standard input (possibly
  16.     redirected) the key pressed must be a carriage return.  If graph is
  17.     interrupted with a control-C, it may leave the display in a
  18.     nonstandard mode.  This can sometimes be fixed by running graph a
  19.     second time and letting it exit normally.
  20.  
  21.     Blank lines and lines beginning with ';' are ignored.
  22.  
  23.     More than one input file can be specified.  All the data will
  24.     be read before scaling parameters are calculated.  The plot
  25.     will be "broken" at the end of each file.  That is, there will
  26.     be no line connecting the last point of the first file with the
  27.     first point of the second file.  Similarly, if a line starts
  28.     with a null byte (that is, if a line feed is followed by a
  29.     null) the plot will be broken.  Separate curves may also be
  30.     delimited with labels (see the -b switch).
  31.  
  32.     The -m switch can be used to select the line style or marker
  33.     style for each curve.  If both markers and connecting lines are
  34.     wanted, read the data file twice and specify different styles. 
  35.     For example,
  36.  
  37.         graph gamma gamma -m 1 -30
  38.  
  39.     would give red squares connected by white solid lines.
  40.  
  41.  
  42. VERSIONS
  43.     Graph is available in several versions.  When necessary for
  44.     configuration control, these versions are given different file
  45.     names (see FILES section below).  It is suggested that the
  46.     "normal" version for a given computer be renamed GRAPH for
  47.     simplicity.  Two measures are taken to ensure no damage is
  48.     done.  First, any version of graph can be executed with a
  49.     question mark as the only parameter:
  50.  
  51.         GRAPH ?
  52.  
  53.     It will then print a help screen which indicates the hardware
  54.     it supports, and exit immediately.  Second, graph tests that
  55.     the hardware it needs is present before using it (except for
  56.     the plotter and laser printer versions).  The test is a
  57.     permissive one, so that "clones" are likely to work.  However,
  58.     it can be fooled.  For example, the Paradise EGA Autoswitch
  59.     video card can emulate the Hercules monochrome graphics card,
  60.     but only when connected to a monochrome monitor.  If the
  61.     Hercules version of graph is used with this card and an EGA
  62.     color monitor, nothing is displayed.
  63.  
  64.     The following modes are supported on the IBM CGA:
  65.     The mode is specified by setting the environment variable
  66.     GRAPHICS before running graph:
  67.  
  68.         SET GRAPHICS=4    ; 200*320 color mode
  69.         SET GRAPHICS=5    ; 200*320 grey scale mode
  70.         SET GRAPHICS=6     ; 200*640 monochrome mode (the default)
  71.  
  72.     The terminology above is IBM's, but note that a color monitor
  73.     connected to the 15 pin connector on the IBM color graphics
  74.     adaptor will display color if the graphics mode is set to
  75.     either 4 or 5.  A composite color monitor connected to the RCA
  76.     jack will display color only in mode 4.
  77.  
  78.     The IBM Enhanced Graphics Adaptor (EGA) is supported in mode 16
  79.     (350*640 color).  At least 128K of memory is assumed, so that
  80.     16 colors are supported.  If only 64K is installed, graph
  81.     should still work but only 4 colors will be displayed.  Only
  82.     one page is used.
  83.  
  84.     The Hercules monochrome graphics card is supported in its
  85.     graphics mode (naturally).  Only page 0 (memory addresses
  86.     b0000-b7fff) is used, so another video adaptor which is mapped
  87.     into memory above b8000 (such as an IBM CGA) can also be
  88.     present.  The card is left in mode HALF (page 1 disabled).
  89.  
  90.     Similarly, these modes are supported on the Z-100: 
  91.  
  92.         SET GRAPHICS=1         ; 225*640 mode (the default)
  93.         SET GRAPHICS=2         ; 400*640 mode
  94.  
  95.     For the Houstin Instruments plotter, HP plotter, or LIPS-10
  96.     laser printer versions, the output port may be specified by
  97.     setting an environment variable:
  98.  
  99.         SET plot_port=COM1        (the default)
  100.         SET plot_port=COM2
  101.         SET plot_port=PRN
  102.  
  103.     Graph asks about several other options: pen speed, pen
  104.     displacement before plotting begins, width and height of
  105.     desired plotting area.
  106.  
  107. OPTIONS
  108.     Options can appear before, among, or after input file names
  109.     provided a file name cannot be mistaken for the parameter of an
  110.     option.
  111.  
  112. -a  [<step> [<start>]]
  113.         Automatically generate abscissas.  The first argument,
  114.         if present, is the step between values (default 1). 
  115.         The second argument, if present, is the starting value
  116.         (default 0, or first argument from -x switch).
  117.  
  118. -b         break (disconnect) the plot after each label.  (See 
  119.         switch -m to plot the line segments with different
  120.         linestyles.  To break the plot without printing labels,
  121.         use empty labels: "".) This option is set automatically
  122.         if more than one input file or more than one linestyle
  123.         is specified.
  124.  
  125. -c <text>    argument is default label for data points
  126.  
  127. -e        equal vertical and horizontal scales (same number of 
  128.         inches on the display per unit in problem space), so that
  129.         circles don't look like elipses
  130.  
  131. -g        -g with no arguments eliminates the grid.  
  132.  
  133. -g <style> <tics> <width>
  134.         First argument is grid style: -1 for tic marks outside
  135.         the graph area, 0 for no grid, 1 for frame with tic
  136.         marks inside (default), 2 for full grid.  Second
  137.         argument is approximate number of small tic marks per
  138.         numeric label (1 to 10, default 5).  Set <tics> to 1 to
  139.         eliminate small tic marks.  Third argument is width of
  140.         grid lines (default 1).
  141.  
  142. -l <text>    next argument is label for graph (printed at top).  If the
  143.         label starts with a double quote it may contain spaces:
  144.             -l "three cornered hat"
  145.  
  146. -m <n1> <n2> <n3>...
  147.         numeric arguments are linestyles for successive line
  148.         segments (see switch -b).  Each positive argument is a
  149.         number of up to three digits WCS, where
  150.             W is the linewidth (0-9, with 0 giving width 1), 
  151.             C is the color (with 0 being brightest), and 
  152.             S is linestyle (1-5, 1 for solid, 2 for dashed,
  153.                 3 for dotted, etc.) 
  154.         If an argument is zero, the data points are plotted as
  155.         dots not connected by lines.  Similarly, a negative
  156.         argument -CS generates a marker:
  157.             C is the color
  158.             S is the marker style (dot, box, cross, etc.)
  159.         An argument can also include a repeat count, as in 3*45
  160.         or 4*-205.
  161.  
  162. -n        Omit numeric labels on axes.  This uses more of the screen 
  163.         for the graph, therefore effectively increases
  164.         resolution slightly.  It may also be used when you want
  165.         to make a hard copy and label it with a typewriter.
  166.  
  167. -t        Transpose x and y values before plotting (-x now refers to
  168.         vertical axis).
  169.  
  170. -x[l] [min [max [junk]]] 
  171.         If l is present, x axis is logrithmic. First argument,
  172.         if present, is lower x limit.  Second argument, if
  173.         present, is upper x limit.  A third numeric argument
  174.         may be present but will be ignored.  By default, these
  175.         values are determined automatically.
  176.  
  177. -y[l]   [min [max [junk]]]  
  178.         Similarly for y axis
  179.  
  180. -y[l]m  [min [max [junk]]]  
  181. -ya[p]  [min [max [junk]]]  
  182. -yp[p]  [min [max [junk]]]  
  183.         Any of these signal that each line of the input
  184.         contains the real and imaginary parts of a complex
  185.         number (after the abscissa, unless -a is also used). 
  186.         An 'm' requests that the magnitude of the number
  187.         (square root of sum of squares of real and imaginary
  188.         parts) be plotted.  'p' or 'a' requests the phase
  189.         (atan(imaginary part/real part), also known as the
  190.         argument) be plotted.  The signs of both parts are
  191.         taken into account, so the phase ranges from -pi to
  192.         +pi.  If both real and imaginary parts are zero, the
  193.         phase is arbitrarily assumed to be zero.  An additional
  194.         'p' requests that the phase be divided by pi before
  195.         plotting.
  196.  
  197. -h  <n>        argument is the fraction of the vertical space to be 
  198.         used for the graph.
  199.  
  200. -u  <n>        argument is the fraction of the vertical space to move 
  201.         up before plotting.
  202.  
  203. -w  <n>        argument is the fraction of the horizontal space to be 
  204.         used for the graph (useful if screen dump routine
  205.         doesn't dump the entire width of the screen).
  206.  
  207. -r  <n>        argument is the fraction of the horizontal space to move 
  208.         right before plotting.
  209.  
  210. FILES
  211.     These are the currently available executable files:
  212.     GRAPHPC.EXE   IBM PC with CGA
  213.     GRAPHEGA.EXE  IBM PC with EGA
  214.     GRAPHH.EXE    IBM PC with Hercules monochrome graphics
  215.     GRAPHZ.EXE    Zenith Z-100
  216.     GRAPHHI.EXE   Houstin Instruments DMP-29 plotter
  217.     GRAPHHP.EXE   HP 7470A plotter
  218.     GRAPHLI.EXE   CIE Laser Image Printing System, or LIPS 10
  219.  
  220. NOTES
  221.     Graph is largely equivalent to the program of the same name on
  222.     Unix, with the following exceptions: Data may come from one or
  223.     more files rather than the standard input.  Line segments that
  224.     go out of bounds are windowed rather than being dropped.  Graph
  225.     may adjust the specified lower or upper limits (outwards) to
  226.     give convenient axis labels.  Steps along axes may not be
  227.     specified.  The screen is always cleared before plotting.  The
  228.     default grid type is frame with tics rather than full grid. 
  229.     Axes may not be reversed by specifying a lower limit greater
  230.     than the upper limit.
  231.  
  232. BUGS
  233.     The screen is always cleared before a plot.
  234.  
  235. AUTHOR
  236.     Copyright (c) 1985, 1986, 1987 by James R.  Van Zandt
  237.     (jrv@mitre-bedford) 27 Spencer Dr., Nashua NH 03062,
  238.     603-888-2272.  Resale forbidden, copying for personal use
  239.     encouraged.  Constructive comments welcome.  
  240.